package exception;

public class ExceptionApiDemo {
    public static void main(String[] args) {
        System.out.println("程序开始运行");
        try {
            String str = "abc";
            System.out.println(Integer.parseInt(str));
        }catch(NumberFormatException e){
            e.printStackTrace();
            System.out.println("运行出错");
            String str=e.getMessage();
            System.out.println(str);
        }
        System.out.println("程序运行结束");
    }
}
